import {reactive} from "vue";
import http from "../http";
import axios from "axios";
const banner = reactive({
  data: [],  // 轮播广告列表
  cate_list: [], // 头部导航菜单
  cateinfo: {}, // 头部导航菜单信息
  get_banner_list(){
    // 获取轮播广告列表
    return http.get("home/banner/").then(response=>{
      console.log('轮播图数据请求成功.....');
      console.log(response);
      this.data = response.data.data;
    })
  },           
  get_course_list() {
    return http.get("home/category/").then(response => {
      console.log('课程列表数据请求成功.....');
      console.log(response);
      this.cate_list = response.data.data;
    })
    
  },

  get_course_info(id) {
    return http.get("home/course/?id="+id).then(response => {
      console.log('课程列表数据请求成功.....');
      console.log(response);
      this.cate_info = response.data.data;
    })
    
  }

})

export default banner;